package org.qing.cloud.common.security.exception;

import org.qing.cloud.common.security.component.SysAuth2ExceptionSerializer;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import lombok.Getter;

/**
 * 自定义OAuth2Exception
 */
@JsonSerialize(using = SysAuth2ExceptionSerializer.class)
public class SysAuth2Exception extends OAuth2Exception {

	private static final long serialVersionUID = -4180800699705706785L;
	
	@Getter
	private String errorCode;

	public SysAuth2Exception(String msg) {
		super(msg);
	}

	public SysAuth2Exception(String msg, String errorCode) {
		super(msg);
		this.errorCode = errorCode;
	}

}
